#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  run.py
#       Author @  Huoty
#  Create date @  2015-12-12 17:32:52
#  Description @
# *************************************************************

from flask import Flask, render_template
from flask.ext.wtf import Form
from wtforms import StringField, SubmitField
from wtforms.validators import Required
from flask.ext.bootstrap import Bootstrap

# configuration
DEBUG = True
SECRET_KEY = 'development key'

# create application
app = Flask(__name__)
app.config.from_object(__name__)
Bootstrap(app)

class NameForm(Form):
    name = StringField("What is your name?", validators=[Required()])
    submit = SubmitField("Submit")

@app.route("/")
def index():
    form = NameForm();
    return render_template("index.html", form = form)

# Script starts from here

if __name__ == "__main__":
    app.run()
